package utils

import (
	"fmt"
	"github.com/cloudwego/kitex/client"
	"monthly/biz/dal/global"
	passenger "monthly/kitex_gen/monthly/passenger/passengerservice"
	wallet "monthly/kitex_gen/monthly/wallet/walletservice"
)

var (
	PassengerClient = &global.AppConf.PassengerClient
	WalletClient    = &global.AppConf.WalletClient
)

func GetPassengerClient() passenger.Client {
	newClient, _ := passenger.NewClient("passenger", client.WithHostPorts(fmt.Sprintf("%v:%v", PassengerClient.Host, PassengerClient.Port)))
	return newClient
}
func GetWalletClient() wallet.Client {
	newClient, _ := wallet.NewClient("wallet", client.WithHostPorts(fmt.Sprintf("%v:%v", WalletClient.Host, WalletClient.Port)))
	return newClient
}
